package cn.mujiankeji.mbrowser.界面.组件.布局

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp


@Composable
fun 项目卡片(clickable : (()-> Unit)?=null,content : @Composable ()->Unit){

    Surface(modifier = Modifier.padding(15.dp,5.dp).fillMaxWidth()
        .then(if (clickable==null) Modifier else Modifier.clickable { clickable() }),
        color = MaterialTheme.colorScheme.surface,
        shape = MaterialTheme.shapes.medium){

        Column(Modifier.padding(15.dp,10.dp)){
            content()
        }

    }

}